#include<bits/stdc++.h>
#define ll long long
#define L x<<1
#define R x<<1|1
#define mid (l+r>>1)
#define lc L,l,mid
#define rc R,mid+1,r
#define Root 1,1,n
#define OK l>=Ll&&r<=Rr
#define rep(x,y,z) for(int x=(y);x<=(z);x++)
#define per(x,y,z) for(int x=(y);x>=(z);x--)
#define pb push_back
#define ull unsigned ll
#define e(x) for(int i=h[x],y=to[i];i;i=nxt[i],y=to[i])
#define E(x) for(auto y:p[x])
#define Pi pair<int,int>
#define ui unsigned int 
inline ll read(){ll s=0,w=1;char c=getchar();while(c<48||c>57) {if(c=='-') w=-1;c=getchar();}while(c>=48&&c<=57) s=(s<<1)+(s<<3)+c-48,c=getchar();return s*w;}
inline void pf(ll x){if(x<0) putchar('-'),x=-x;if(x>9)pf(x/10);putchar(x%10+48);}
const int N =1e6+5,M=1e6+5,inf=2147000000;
const ll llf=1e18,mod=1e9+7;
const double eps=1e-7;
using namespace std;
int n;
double a,b,w[N],ans;
inline bool cmp(double a,double b){
	return a-eps>b;
}
double k[N];
inline void check(double x){
	double y=1.0-x;
	if(x-eps<y)swap(x,y);
	rep(lk,1,n){
		int rk=n-lk,tot=0;
		rep(i,1,min(lk,rk)){
			k[++tot]=x+(double)i-1.0;
			k[++tot]=y+(double)i;
		}
		rep(i,rk+1,lk)k[++tot]=x+(double)i-1.0;
		rep(i,lk+1,rk)k[++tot]=y+(double)i;
		double now=0.0;
		rep(i,1,n)now=max(now,sqrt(w[i]+k[i]*k[i]));
		if(ans==0.0||ans-now>eps)ans=now;
	}
} 
int main(){
	freopen("temple.in","r",stdin);
	freopen("temple.out","w",stdout);
	n=read();
	rep(i,1,n){
		scanf("%lf%lf",&a,&b);
		w[i]=min(a*a/4.0+b*b,b*b/4.0+a*a);
	}
	sort(w+1,w+n+1,cmp);
	double del=0.0001;
	for(double i=0.0;0.6-i>eps;i=i+del)check(i);
	printf("%.7lf",ans);
	return 0;
}
